Repository navigation
fix(rest): GET /forms/:slug reads a .custom pair's own translation of its form view override - #35290
Conversation
Claude-Session: https://claude.ai/code/session_01Utp6CZiaBg6rk7dpy1s9Me Co-authored-by: Claude <noreply@anthropic.com>
…anslations The view translate call asks pairTranslationBundleOf of the served view, the same question the /meta/view reads ask, so a pair override's own zh-CN row reaches the anonymous form. The object call is unchanged. Claude-Session: https://claude.ai/code/session_01Utp6CZiaBg6rk7dpy1s9Me Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZiaBg6rk7dpy1s9Me Co-authored-by: Claude <noreply@anthropic.com>
…he engine-double ledger Claude-Session: https://claude.ai/code/session_01Utp6CZiaBg6rk7dpy1s9Me Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 19 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin aae2b9e2c371ca4ef5ce3b3a24c3f80d35c25c2b && git checkout aae2b9e2c371ca4ef5ce3b3a24c3f80d35c25c2b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f848e3739f36fdfadc58cb4ce07defda6e624cba 8d14c223ba64dbf2d2f2628a139a7de028c130cb && git checkout -B drift-repro f848e3739f36fdfadc58cb4ce07defda6e624cba && git merge --no-ff 8d14c223ba64dbf2d2f2628a139a7de028c130cb
node scripts/docs-audit/affected-docs.mjs --json f848e3739f36fdfadc58cb4ce07defda6e624cba |
|
repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me Final green head for L1: Checks at this head: 37 success, 16 skipped, 0 failed. Not governed ( |
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head
|
|
repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me Landing · head
Status: |
Requested by Bill · project thread
repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me
Fixes #34806
Clause-②: no
Metadata-protocol: none
维护者速读
GET /forms/:slug翻译表单视图时,补上.custom配对包自带的译文这一档,与/meta/view读取同一套标签顺序。/meta却看到中文;同一份文档两处答案不同。form-routes.ts一处调用。packages/rest/src/form-routes.ts(视图翻译调用处新增的pairTranslationBundleOf);packages/rest/src/public-form-pair-translation.test.ts(含/meta对照腿)。pnpm --filter @objectstack/rest exec vitest run src/public-form-pair-translation.test.ts,预期 5 个用例全绿;其中 zh-CN 用例的表单标题与分区标题为配对包译文。What changes
GET /forms/:slugnow hands the public form's view translator the.custompair's own translations (pairBundle), asked withpairTranslationBundleOf(p, 'view', match.view), the same question the/meta/viewlist and item reads ask (ruling 6995998752: the read half only). The label order is the one already ruled (6631250894 on #30062, restated 6942920667 on #33952) and owned by@objectstack/spec/system'slabelCatalogs: a translation the pair ships, then the override's own text, then the base's translation. With no pair, or a pair that ships no row for the request's locale, the helper answersundefinedand the call is exactly what it was.servedOverrideBaseOf.pairBundle". This change makes that false for the route, so the comment now states the object-specific reason. The code there is untouched.packages/metadata-protocol/**is not touched. The write-door half is split off by the ruling.Tests
New
packages/rest/src/public-form-pair-translation.test.ts. It uses the realObjectStackProtocolImplementationover a realSchemaRegistry. The fixture seeds a container form under the base package, the pair's declared override row (package_id: BASE.custom,overrides.package: BASE) and the pair's zh-CNtranslationrow. Every cell reads both/forms/:slugandGET /meta/view/:name(the control leg) on the same fixture:_packageId= base,overrides.package= base,servedOverrideBaseOfanswers the base);Code was last changed at
f62c05f8a0, and the package runs below are on that tree. The later commits8a81c3c7dd(changeset wording) and8d14c223ba(one add-only row inscripts/engine-double-contract.pinned.json) change no code. The gates that read those files were re-run at8d14c223ba.Red leg (test committed before the fix, route unchanged)
The
/meta/viewcontrol assertion in the same cell passed before the/formsone failed.Ablation on the committed fix (scripts/ablation-replace.mjs, --delete of the pairBundle spread)
The test imports
./rest-server.jsfrom source, so nodist/rebuild is involved.Package runs
Acceptance notes
public-form-section-i18n.test.ts. The fixture here is the/metaprecedence host, not that file's protocol double, so the two do not share a harness.submitBehavior). The translator reads the same catalogs there, but no test here seeds it.Verification
Local subset only.
node scripts/pm/dispatch-gates.mjs --ranreports 74 derived, 72 run, 2 NOT-MEASURED, 0 UNRUN. CI runs every family, and its check-runs on this PR are the verdict.check:engine-double-contractfirst answered exit 1,RETAINED [findOne]for the new test'sfindOnedouble: that is new pinned coverage. The fix was--write, which added one row to the ledger, and the re-run exited 0.check:dual-build-cjs-loads, exit 3, PREREQUISITE NOT MET (only the rest dependency closure was built, not the whole repo).check:type-check-debt, timed out at 300 s (a repo-wide re-measure on a shared box).overlap-check --branch=claude/issue-34806-public-form-pair-bundle: VERDICT clean. It merges cleanly with origin/main and with fix(approvals): a recall or subflow-parent strand reports the hook refusal that stranded the run #34999, which shares the ledger file.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CZiaBg6rk7dpy1s9Me